const connect = require('../utils/db')

const find = async () => {
  const {db, client} = await connect()
  const collection = db.collection('movies')

  // 查询操作
  return collection.find({rt: {$gte: '2020-01-01'}}, {
    projection: {
      nm: 1,
      _id: 0,
      rt: 1
    }
  }).toArray()

  client.close()
}

module.exports = {
  find
}